package com.ruoyi.notify.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.notify.mapper.BackendOrderNotifyMapper;
import com.ruoyi.notify.domain.BackendOrderNotify;
import com.ruoyi.notify.service.IBackendOrderNotifyService;

/**
 * 订单通知Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-19
 */
@Service
public class BackendOrderNotifyServiceImpl implements IBackendOrderNotifyService 
{
    @Autowired
    private BackendOrderNotifyMapper backendOrderNotifyMapper;

    /**
     * 查询订单通知
     * 
     * @param id 订单通知主键
     * @return 订单通知
     */
    @Override
    public BackendOrderNotify selectBackendOrderNotifyById(Long id)
    {
        return backendOrderNotifyMapper.selectBackendOrderNotifyById(id);
    }

    /**
     * 查询订单通知列表
     * 
     * @param backendOrderNotify 订单通知
     * @return 订单通知
     */
    @Override
    public List<BackendOrderNotify> selectBackendOrderNotifyList(BackendOrderNotify backendOrderNotify)
    {
        return backendOrderNotifyMapper.selectBackendOrderNotifyList(backendOrderNotify);
    }

    /**
     * 新增订单通知
     * 
     * @param backendOrderNotify 订单通知
     * @return 结果
     */
    @Override
    public int insertBackendOrderNotify(BackendOrderNotify backendOrderNotify)
    {
        backendOrderNotify.setCreateTime(DateUtils.getNowDate());
        return backendOrderNotifyMapper.insertBackendOrderNotify(backendOrderNotify);
    }

    /**
     * 修改订单通知
     * 
     * @param backendOrderNotify 订单通知
     * @return 结果
     */
    @Override
    public int updateBackendOrderNotify(BackendOrderNotify backendOrderNotify)
    {
        backendOrderNotify.setUpdateTime(DateUtils.getNowDate());
        return backendOrderNotifyMapper.updateBackendOrderNotify(backendOrderNotify);
    }

    /**
     * 批量删除订单通知
     * 
     * @param ids 需要删除的订单通知主键
     * @return 结果
     */
    @Override
    public int deleteBackendOrderNotifyByIds(Long[] ids)
    {
        return backendOrderNotifyMapper.deleteBackendOrderNotifyByIds(ids);
    }

    /**
     * 删除订单通知信息
     * 
     * @param id 订单通知主键
     * @return 结果
     */
    @Override
    public int deleteBackendOrderNotifyById(Long id)
    {
        return backendOrderNotifyMapper.deleteBackendOrderNotifyById(id);
    }
}
